package com.dailyblue.java.standard.interview.offer1;

import java.math.BigDecimal;

public class CalculateMethod1 implements CalculateValue {
    @Override
    public BigDecimal calculateFruitValue(BigDecimal weight, BigDecimal price) {
        BigDecimal rate = new BigDecimal("0.5");
        BigDecimal valueResult = null;
        BigDecimal beforeDiscount = null;
        beforeDiscount = weight.multiply(price);
        valueResult = beforeDiscount.multiply(rate);
        return valueResult;
    }
}
